home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 247 / 247.d81 / t.tales of Kim 3 < prev    next >
Text File  |  2022-08-26  |  14KB  |  457 lines

  1. u
  2.              Tales of KIM
  3.       On the Edge -- Chapter 1.5
  4.            by Brian Bagnell
  5.                Part III
  6.  
  7.  
  8.     Rather than try to represent the
  9. scenario graphically, Jim chose to
  10. display the altitude, fuel, and rate
  11. of decent as numbers. Anyone playing
  12. would have to imagine himself huddled
  13. in a capsule with only the instrument
  14. readings to guide him. Four glowing
  15. red LED digits displayed the altitude
  16. and the right two digits represented
  17. the rate of descent.
  18.  
  19.     Lunar Lander might seem primitive
  20. by today's standards, but back in 1975
  21. board games were the most popular
  22. games available. Snakes and Ladders,
  23. Monopoly, and Checkers were the
  24. pinnacle of gaming, so something like
  25. Lunar Lander was futuristic by
  26. comparison. Lunar
  27.  
  28.     Lander was a hit at conventions
  29. and gatherings, where it fascinated
  30. hobbyists. Part of the appeal was the
  31. adventure element. Individual landings
  32. could last five minutes or more, so
  33. players could become deeply engaged in
  34. a single game. For a grueling stretch
  35. while the lander descended, a player
  36. would intently study the rate of
  37. decent versus the altitude, and
  38. occasionally glimpse the fuel gauge.
  39. After four minutes, the lander would
  40. be close to the surface, and tension
  41. began to mount. If everything went
  42. just right, the player was rewarded
  43. with a SAFE message.
  44.  
  45.     More often, fuel ran out and the
  46. module went crashing into the lunar
  47. surface as the dreaded DEAD message
  48. flashed onto the screen. (Lunar Lander
  49. would later spawn a mini-genre of
  50. games around the lunar landing concept
  51. such as Lunar Lander (with graphics),
  52. Thrust, and Space Taxi.)
  53.  
  54.     Jim Butterfield also created a
  55. small utility called Hypertape, which
  56. had an impact on the KIM-1 user
  57. community. Butterfield was having
  58. lunch with a friend who also owned a
  59. KIM-1, and mentioned that the unusual
  60. circuitry of the KIM-1's cassette tape
  61. input would make it possible to
  62. enhance the speed of tape reading.
  63. "You don't need all those 1's and 0's
  64. written on the tape," he said. The
  65. friend, Julien Dubi, asked how that
  66. could be accomplished and Jim outlined
  67. his approach.
  68.  
  69.     The next day, Julien reported a
  70. speedup of three times. Feeling that
  71. this was a challenge, Jim looked more
  72. closely at the code, and found extra
  73. ways to accelerate the format. The
  74. final version of the program allowed
  75. data to be written six times faster. A
  76. full one-kilobyte program now only
  77. took 20 seconds to load with the
  78. standard KIM-1 system, as opposed to
  79. the regular two minutes.
  80.  
  81.     In July 1976, the first issue of
  82. Kim-1 User Notes appeared, with Eric
  83. Rehnke as editor and contributions
  84. from Butterfield. Jim eventually
  85. amassed enough information to release
  86. a book. He teamed up with Rehnke and
  87. Stan Ockers to self publish a 176-page
  88. opus called The First Book of KIM.
  89. This was one of the pioneering works
  90. in what would later become a lucrative
  91. computer-publishing business.
  92.  
  93.     Several key areas of the KIM-1
  94. were explained which could not be
  95. found elsewhere, such as programming
  96. the LED display to output custom
  97. characters and using the timers built
  98. into the 6530 chips. The book was also
  99. a software treasure trove, containing
  100. carefully commented listings for the
  101. most popular KIM-1 programs. The book
  102. gained a reputation as being
  103. indispensable for KIM-1 users and
  104. programmers.
  105.  
  106.     One of the contributors to The
  107. First Book of KIM was Peter Jennings
  108. (not to be confused with the news
  109. anchor), another Toronto resident.
  110. Jennings had just graduated university
  111. and he was anxious to purchase his own
  112. computer system. Cost was a major
  113. factor in his decision because of
  114. outstanding student loans. He knew
  115. from articles in magazines that the
  116. Altair used an 8080 chip and the KIM-1
  117. used a 6502 chip. Jennings wanted to
  118. test drive his new computer before
  119. buying, but microcomputer users were
  120. hard to find.
  121.  
  122.     "We take for granted how easy it
  123. is to track down people with common
  124. interests these days with Google,"
  125. says Jennings. "The only group of
  126. computer enthusiasts in Toronto at the
  127. time was 100% 8080."
  128.  
  129.     To weigh the merits of each chip,
  130. Jennings, who worked for a company
  131. called Comshare and had access to a
  132. Xerox Sigma IX time-sharing computer,
  133. developed a set of emulators modeling
  134. the 8080 and 6502 chips. When Jennings
  135. finished his comparison, it was no
  136. contest. He wanted to program the
  137. 6502.
  138.  
  139.     In May 1976, Jennings made a small
  140. journey to the Midwest Regional
  141. Computer Conference in Cleveland,
  142. Ohio, just four hours from Toronto.
  143. There he paid $245 for his KIM-1 and
  144. happily drove back across the border
  145. to begin a much longer journey.
  146.  
  147.     Peter Jennings contributed a
  148. simple game to The First Book of Kim,
  149. but he wanted to try something more
  150. challenging. He chose the game of
  151. kings, chess. Chess programs are
  152. notorious for using large amounts of
  153. memory. The program must create copies
  154. of the chessboard and then evaluate
  155. each board. Most sane people scoffed
  156. at the idea of creating a chess-
  157. playing program in one kilobyte of
  158. memory.
  159.  
  160.     To put one-kilobyte of memory in
  161. perspective, imagine a display of 40
  162. characters by 25 lines - 1000
  163. characters on a single screen. That is
  164. just about one-kilobyte. Jennings'
  165. task was like setting a table for 12
  166. people on a stool. If he had thought
  167. about it a little more, he probably
  168. never would have started. "Most
  169. computer programmers thought it was
  170. impossible," remarks Jennings.
  171.  
  172.     In order for the computer to move
  173. a chess piece, it must be able to
  174. identify all legal chess moves at any
  175. given time. This is a tall order with
  176. just one kilobyte of memory,
  177. considering there are six different
  178. chess pieces that all make unique
  179. moves. Furthermore, some moves are
  180. illegal when the king is under attack.
  181. Jennings' program had to test all
  182. these conditions. If Jennings' game
  183. merely made a random legal move, it
  184. would have been sufficiently
  185. impressive. Peter wanted more. He
  186. wanted the computer to think and
  187. scheme.
  188.  
  189.     Not only was memory space against
  190. him, but his tools were absurdly
  191. primitive. Programming the game would
  192. be difficult even with a powerful
  193. computer connected to a keyboard and
  194. video display but Jennings had only
  195. the KIM-1 to develop his masterpiece -
  196. a small calculator keypad and
  197. six-digit display, connected to a
  198. teletype machine for hard copy.
  199.  
  200.     Still, he used what was available
  201. to him, even including extra
  202. functions. "Peter found room for
  203. diagnostics," marvels Jim Butterfield.
  204. "For example, the display would
  205. flicker with data during the strategy
  206. part of the run, and he could read
  207. what it was up to - 'It's checking
  208. Queen mobility now...'" For months,
  209. Jennings toiled away at his impossible
  210. task. Sometimes he was a willing
  211. insomniac, gloriously coding until
  212. sunrise with (and sometimes against)
  213. his KIM-1.
  214.  
  215.     Those who looked in on him thought
  216. he was performing deep calculations
  217. with a large calculator, oblivious
  218. that he was actually teaching a
  219. computer to think about chess. Six
  220. months later, Jennings prevailed in
  221. his battle against the kilobyte.
  222. Microchess used 1118 of the available
  223. 1152 bytes of memory in the KIM-1.
  224.  
  225.     "It was quite a squeeze," says
  226. Butterfield. "He even made use of the
  227. small RAM areas within the 6530 chips.
  228. I found it an amazing accomplishment."
  229. It is easy to be impressed by large
  230. projects, but more difficult to
  231. appreciate something small. Jennings
  232. program was smaller than any piece of
  233. software written today, yet the
  234. compactness and efficiency made it
  235. impressive. His accomplishment must
  236. rank as one of the most incredible
  237. programming feats of all time.
  238.  
  239.     "Jennings had accomplished
  240. something that, if asked, I might have
  241. dismissed as impossible to do in that
  242. small computer," says Butterfield.
  243.  
  244.     Engineer Robert Yannes credits
  245. some of Jennings success to the 6502
  246. itself: "The 6502 was a very efficient
  247. processor for its day." In many ways,
  248. Jennings achievement was lonely.
  249. Everyone can appreciate a baseball
  250. knocked over the outfield fence, but
  251. it was a rare person who could
  252. understand this achievement. But Jim
  253. Butterfield and the cadre of
  254. programmers around him knew what it
  255. meant.
  256.  
  257.     "Peter demonstrated his program at
  258. a small gathering of KIM-1 users in my
  259. home," recalls Butterfield. "I had set
  260. up a chessboard marked with the
  261. coordinates to match the KIM's displ